<template>
  <page-body>
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center chapasPh_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub chapasPh_fd0_0'>
          <view class='flex flex-wrap align-center chapasPh_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  chapasPh_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='chapasPh_fd0_0_c1_c0'>修改密码</text>
          </view>
          <view class='flex flex-wrap align-center justify-end chapasPh_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <view class="flex flex-direction flex-wrap align-center benben-position-layout flex chapasPh_flex_1"
        :style="{height:(150+bottomSafeAreaRpx)+'rpx',paddingBottom:bottomSafeAreaRpx+'rpx', }">
        <button class='chapasPh_fd1_0' @tap.stop="getclf6db4db8abcfFunc()">下一步</button>

      </view>
      <view :style="{height: (150+bottomSafeAreaRpx)+'rpx'}"></view>

      <view class="flex flex-direction align-center benben-flex-layout">
        <text class='chapasPh_fd2_0'>我们要对您绑定的手机号进行验证：</text>
        <text class='chapasPh_fd2_1'>{{userInfo.mobile}}</text>
        <benben-digital-password :box-num='4' mode='number'
          class-name="flex flex align-center justify-center chapasPh_fd2_2" v-model="code">
          <template #default="{ content, active, index }">
            <view :key="index" v-if="active"
              class="flex align-center justify-center active-digital-password chapasPh_flex_password_active_fd2_2">
              {{ content }}
            </view>
            <view :key="index" v-else class="flex align-center justify-center chapasPh_flex_password_noActive_fd2_2">
              {{ content }}
            </view>
          </template>
        </benben-digital-password>
        <!-- <benben-send-verification-code key='1724830297735' ref="vCode1724830297735" class='chapasPh_fd2_3'
          after-text='后重新获取' before-text='获取验证码' emptye-text='请输入手机号' validate-text='请输入正确手机号' account-type='phone'
          :auto='true' :is-environment-verification='false' type='2' :phone="userInfo.phone"
        ></benben-send-verification-code> -->
		
		 <benben-send-verification-code key='1724830134548' ref="vCode1724830134548" class='chapasPh_fd2_3'
				    after-text='后重新获取' before-text='获取验证码' emptye-text='请输入账号' validate-text='请输入正确账号' account-type='phone'
				    :auto='true' :is-environment-verification='true' type='2' :phone="userInfo.phone"></benben-send-verification-code>
          <!-- @handle="getncb5bdc44796e8Func()" -->
      </view>




    </view>
  </page-body>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "userInfo": uni.getStorageSync('USER_INFO') || '',
        "code": "",
        "code1": {
          "code": ""
        }
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.userInfo = uni.getStorageSync('USER_INFO') || ''
	  if(uni.getStorageSync('USER_GROUP')==2){
		  this.userInfo.phone=this.userInfo.mobile
		  this.userInfo.mobile=this.userInfo.mobile.slice(0,3)+'****'+this.userInfo.mobile.slice(7)
	  }
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //基础功能-校验验证码
      async getclf6db4db8abcfFunc() {
        //请求方法
        //数据验证

        let data5f6db4db8abcf = await this.$api.post(global.apiUrls.post5f6db4db8abcf, {
          mobile: this.userInfo.phone,
          code: this.code,
          type: '2'
        });

        if (data5f6db4db8abcf.data.code != 1) {
          this.$message.info(data5f6db4db8abcf.data.msg);
          return
        }
        let info5f6db4db8abcf = data5f6db4db8abcf.data;
		 this.$urouter.navigateTo(`/pages/My/newPhonePass/newPhonePass`);


      },
      //下一步
      navLabFunc() {
        this.getclf6db4db8abcfFunc()
       
      },
      //基础功能-发送验证码
      async getncb5bdc44796e8Func() {
        //请求方法
        //数据验证
return
        let datacode1 = await this.$api.post(global.apiUrls.post5b5bdc44796e8, {
          mobile: this.userInfo.phone,
          type: '2',
          is_test: '1'
        });

        if (datacode1.data.code != 1) {
          this.$message.info(datacode1.data.msg);
          return
        }
        let infocode1 = datacode1.data;
        this.code1 = infocode1.data

      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #Fff;
    background-size: 100% auto;
  }

  .chapasPh_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .chapasPh_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .chapasPh_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .chapasPh_fd0_0_c0 {
    width: 120rpx;
  }

  .chapasPh_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .chapasPh_flex_1 {
    width: 750rpx;
    height: 150rpx;
    overflow: hidden;
    z-index: 10;
    bottom: calc(0rpx + var(--window-bottom));
  }

  .chapasPh_fd1_0 {
    background: #145efd;
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    font-size: 32rpx;
    color: #fff;
    height: 88rpx;
    line-height: 88rpx;
    width: 638rpx;
  }

  .chapasPh_fd2_3 {
    min-width: 250rpx;
    line-height: 42rpx;
    text-align: center;
    font-size: 28rpx;
    color: rgba(235, 53, 41, 1);
    border-radius: 21rpx 21rpx 21rpx 21rpx;
  }

  .chapasPh_flex_password_noActive_fd2_2 {
    border: 1px solid rgba(216, 216, 216, 1);
    width: 100rpx;
    height: 100rpx;
  }

  .chapasPh_flex_password_active_fd2_2 {
    border: 1px solid var(--benbenbdColor4);
    width: 100rpx;
    height: 100rpx;
  }

  ::v-deep .chapasPh_fd2_2 {
    width: 750rpx;
    height: 160rpx;
  }

  .chapasPh_fd2_1 {
    margin: 51rpx 0rpx 40rpx 0rpx;
    line-height: 37rpx;
    font-size: 32rpx;
    font-weight: 500;
    color: var(--benbenFontColor0);
  }

  .chapasPh_fd2_0 {
    font-size: 28rpx;
    font-weight: 400;
    color: var(--benbenFontColor0);
  }
</style>
